package top.lshaci.learning.springboot.jpaquerydsl.qo;

import lombok.Data;
import top.lshaci.learning.springboot.jpaquerydsl.core.DslCondition;
import top.lshaci.learning.springboot.jpaquerydsl.core.DslFrom;
import top.lshaci.learning.springboot.jpaquerydsl.core.DslMatcher;
import top.lshaci.learning.springboot.jpaquerydsl.entity.QUser;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;

/**
 * UserQo
 *
 * @author lshaci
 * @since 1.0.0
 */
@Data
@DslFrom(QUser.class)
public class UserQo extends BaseQuery {

    @DslCondition(field = {"name", "nick"}, matcher = DslMatcher.SW)
    private String keyword;

//    @DslCondition(matcher = DslMatcher.EQ)
    private String name;

    @DslCondition(matcher = DslMatcher.LE)
    private Integer age;

    @DslCondition(matcher = DslMatcher.LE)
    private Date birthday;

    @DslCondition(matcher = DslMatcher.LE)
    private LocalDate registerDate;

    @DslCondition(matcher = DslMatcher.LE)
    private LocalTime registerTime;

    @DslCondition(matcher = DslMatcher.LE)
    private LocalDateTime registerDateTime;
}
